<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>JavaScript 递归方式计算 5 的阶乘</title>
</head>
<body>
    <script>
        function a(c){
            if(c === 1){
                return 1;
            }else{
                return c * a(c-1);
            }
        }
        console.log(a(5));
    </script>
</body>
</html>